#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time: 2022/12/22 10:00
# @Author: 余桂林
# @Email: 1151026784@qq.com
# @File：__init__.py.py

from selenium.webdriver.common.by import By

class DataPage:
    my_locator = (By.XPATH, '//android.widget.FrameLayout/android.widget.RelativeLayout[1]/android.widget.ImageView[1]')
    username_locator = (By.XPATH, '//android.widget.TextView[@resource-id=\"com.gfeng.daydaycook:id/tv_intro\"]')

    def __init__(self,driver):
        self.driver = driver

    # def click_btn_my(self):
    #     self.driver.find_element(*self.my_locator).click()

    def get_username(self):
        return self.driver.find_element(*self.username_locator).text

